<template>
    <div id="app">
        <Head :goback_custom="true" @gobackCustomMethod="$emit('hideProdescribe')">项目描述</Head>
        <div class="stip">请填写项目的详细描述，更容易让人了解哦~</div>
        <textarea v-model="prodescribe" placeholder="字数限制100字以内哦~" maxlength="100"></textarea>
        <div class="wordnum">{{prodescribe.length}}/100</div>
        <div class="btn" @click="doProdescribe">保&nbsp;&nbsp;存</div>
    </div>
</template>
<script>
export default {
  components: {
  },
  data () {
    return {
      prodescribe: ''
    }
  },
  methods: {
    doProdescribe () {
      if (!this.prodescribe) {
        this.$notify('请填项目描述')
        return false
      }
      this.$emit('doProdescribe', { prodescribe: this.prodescribe })
      this.backList()
    },
    backList () {
      this.$emit('hideProdescribe')
    }
  }
}
</script>
<style lang="scss" scoped>
.stip{
    margin-top: 18px;
    margin-left: 24px;
    margin-bottom: 20px;
    line-height: 1;
    font-size: 15px;
    color: #888c94;
}
textarea{
    width: calc(100vw - 48px);
    height: 272px;
    line-height: 2;
    margin-left: 24px;
    resize: none;
    border-radius: 5px;
    border: 1px solid #f5f5f5;
    box-shadow: 0px 0px 5px rgba($color: #ccc, $alpha: 0.3);
    font-size: 12px;
    padding: 12px 13px 12px 13px;
    color: #0f141d;
}
textarea::-webkit-input-placeholder {
    color: #d8d8d8;
}
.wordnum{
    margin-top: 15px;
    line-height: 1;
    position: absolute;
    right: 24px;
    font-size: 13px;
    color: #555555;
}
.btn{
    margin-top: 92px;
    margin-left: 21px;
    width: calc(100vw - 42px);
    height: 47px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #464646;
    border-radius: 50px;
    background-color: #fed700;
    box-shadow: 0px 1px 7px rgba($color: #fed700, $alpha: 0.8);
}
</style>
